﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Main.Master" AutoEventWireup="true" CodeBehind="ApprovePurchaseOrderList.aspx.cs" Inherits="PresentationLayer.ApprovePurchaseOrderList" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
        <div align="center">
            <h1>Stationery Purchase Order List for Approval</h1>
            <br />
            <asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
            <asp:UpdatePanel ID="UpdatePanel1" runat="server">
                <ContentTemplate>
                    <table>
                        <tr>
                            <td>
                                <fieldset>
                                    <legend>Filter By</legend>
                                    <table class="table-condensed">
                                        <tr>
                                            <td><asp:Label ID="lblSupplierName" runat="server" Text="Supplier Name"></asp:Label></td>
                                            <td><asp:DropDownList ID="ddlSupplierName" runat="server" CssClass="form-control" Width="199px"></asp:DropDownList></td>
                                            <td><asp:Button ID="btnFilter" runat="server" Text="Filter" OnClick="btnFilter_Click" CssClass="btn-primary" /></td>
                                        </tr>
                                        <tr>
                                            <td><asp:Label ID="lblRequestedBy" runat="server" Text="Requested By"></asp:Label></td>
                                            <td><asp:DropDownList ID="ddlRequestedBy" runat="server" CssClass="form-control" Width="199px"></asp:DropDownList></td>
                                            <td>&nbsp;</td>
                                        </tr>
                                    </table>
                                </fieldset>
                            </td>
                        </tr>
                    </table>
                    <br />
                    <hr />
                    <br />
                    <asp:Label ID="lblMessage" runat="server" ForeColor="Red"></asp:Label>
                    <asp:GridView ID="gvPurchaseOrderList" runat="server" AutoGenerateColumns="False" AllowPaging="True" OnPageIndexChanged="gvPurchaseOrderList_PageIndexChanged" OnPageIndexChanging="gvPurchaseOrderList_PageIndexChanging" CssClass="table table-hover table-striped table-bordered" Width="70%">
                        <Columns>
                            <asp:TemplateField HeaderText="Purchase Order No.">
                                <ItemTemplate>
                                    <asp:Label ID="lblPOIdGV" runat="server" Text='<%# Eval("POId") %>'></asp:Label>
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="Supplier Name">
                                <ItemTemplate>
                                    <asp:Label ID="lblSupplierNameGV" runat="server" Text='<%# Eval("SupplierName") %>'></asp:Label>
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="Requested By">
                                <ItemTemplate>
                                    <asp:Label ID="lblRequestedByGV" runat="server" Text='<%# Eval("RequestedBy") %>'></asp:Label>
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="Expected Delivery Date">
                                <ItemTemplate>
                                    <asp:Label ID="lblExpectedDateGV" runat="server" Text='<%# Eval("ExpectedDate") %>'></asp:Label>
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="View Detail">
                                <ItemTemplate>
                                    <asp:LinkButton ID="lbtnViewDetailGV" runat="server" OnClick="lbtnViewDetailGV_Click">View Detail</asp:LinkButton>
                                </ItemTemplate>
                            </asp:TemplateField>
                        </Columns>
                        <PagerSettings Mode="NumericFirstLast" />
                    </asp:GridView> 
                    <br />                   
                </ContentTemplate>
            </asp:UpdatePanel>
        </div>
</asp:Content>
